<template>
  <div
    class="jy-style-height message-box"
    :style="{
      background: `rgba(33, 33, 33, 1) url(${
        publicUrls + 'free/style7/publicStyle7Bg.png' + '?imageView2/3/format/webp'
      })`,
    }"
  >
    <div class="cultural-bg"> 
      <div class="message-heard">
        <img @click="blankHome" class="backHome"  :src="publicUrls + 'free/style7/backHome.png'" alt="" />
        <span class="heard-title">留言板</span>
        
      </div>
      <div class="comment-box">
        <comment text="发表评论" />
      </div>
      <div class="commentList-box">
        <div class="commentNum" v-if="total !== 0">共{{ total }}条留言</div>
        <div class="commentList-box-content">
          <ScrollBox color="rgba(50, 43, 37, 1)" v-if="scrollheight" :byid="4235" :width="scrollheight">
            <template #solidBorderCon>
              <commentList
                @emitTotal="emitTotal"
                textColor="#56677B"
                bgColor="rgba(241, 239, 234, 0.50)"
                replyColor="#56677B"
              />
            </template>
            <template #solidBorderEx>
              <div class="solidBorder-child"></div>
            </template>
          </ScrollBox>
        </div>
      </div>
    </div>
    <MenuNavigation />
    <a :href="doorUrl" target="blank" class="logo-box">
      <i class="iconfonts">&#xe6dd;</i>
      <span>· 永不落幕的展览与展示平台</span>
    </a>
  </div>
</template>

<script lang="ts">
// @ts-nocheck
export default defineComponent({
  name: 'style7',
});
</script>

<script setup lang="ts">
// @ts-nocheck
import { defineComponent, ref } from 'vue';
import comment from '../messageComponent/style7/comment.vue';
import commentList from '../messageComponent/style7/commentList.vue';
import { publicUrls, doorUrl } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
const commonStore = commonDataStore();
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const router = useRouter();
const route = useRoute();
const store = useProjectStore();
const total = ref(0);
const scrollheight = ref();
let viewportHeight = window.innerHeight;
scrollheight.value = viewportHeight * 0.33;
const blankHome = () => {
    // console.log('厨房大')
  //   store.menuId = null; 
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
const emitTotal = (num: number) => {
  total.value = num;
};
</script>

<style scoped lang="less">
.message-box {
  width: 100%;
  padding-bottom: 0px;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  position: absolute;
  bottom: 0px;
  left: 0px;
  .iconfonts {
    font-size: 25px;
    line-height: 32px;
    color: rgba(156, 180, 158, 1);
    margin-top: 3px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 22.4px;
    text-align: left;
    color: rgba(156, 180, 158, 1);
    margin-left: 8px;
  }
}
.cultural-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 124px 120px;
  padding-bottom: 0px;
}
.message-heard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 40px;

  .backHome {
    position: absolute;
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
    cursor: pointer;
    width: 48px;
    height: 48px;
    margin-left: 0 !important;
    z-index: 30;
  }
  .heard-title {
      
      width: 200px;
    color: rgba(112, 157, 134, 1);
    font-family: 'SourceHanSerifCN-Bold';
    font-size: 36px;
    line-height: 56px;
    text-align: center;
  }
}
.comment-box {
  width: 100%;

  margin-bottom: 32px;
}
.commentList-box {
  display: flex;
  flex-direction: column;
  //   flex: 1;
  height: 428px;
  width: 100%;
}

.commentNum {
  width: 100%;
  height: 24px;
  font-family: PingFang SC;
  font-size: 18px;
  font-weight: 400;
  line-height: 25px;
  text-align: left;
  color: rgba(51, 51, 51, 1);
  margin-bottom: 34px;
}
.commentList-box-content {
  width: 100%;
  height: 100%;
  // overflow: auto;
}
.solidBorder-child {
  width: 1px;
  height: 100%;
  background: rgba(156, 180, 158, 1);
  //   opacity: 0.6;
}
// ::v-deep .unit-exbi-remarks-info-remarks {
// width: 100% !important;
// }
::v-deep .solid-box-parent {
  margin-right: 20px;
}
::v-deep .templatestyle1-scroll-box-tumb {
  align-items: center;
  justify-content: center;
  top: -1px;
}
.commentList-box-content::-webkit-scrollbar {
  display: none;
}
::v-deep .t-textarea__inner {
  border: none;
}
:deep(.t-avatar) {
  width: 64px !important;
  height: 64px !important;
}
::v-deep .commentItem {
  margin-bottom: 50px;
}

::v-deep .templatestyle1-scroll-box-tumb {
  display: flex;
  justify-content: center;
  align-items: center;
  top: -4px;
  .scrollBar {
    width: 5px;
    height: 100%;
    background: rgba(156, 180, 158, 1);
    border-radius: 4px;
    box-shadow: none;
  }
}
</style>